import 'package:flutter/material.dart';
import 'tap_demo.dart';
import 'drag_demo.dart';
import 'scale_demo.dart';
import 'gesture_recognizer_demo.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Gesture Recognition Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: const GestureDemoHome(),
    );
  }
}

class GestureDemoHome extends StatelessWidget {
  const GestureDemoHome({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Gesture Recognition')),
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              const Text(
                '1. Tap, Double Tap, Long Press',
                style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
              ),
              const TapDemo(),
              
              const Divider(height: 30),
              const Text(
                '2. Drag Gestures',
                style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
              ),
              const DragDemo(),
              
              const Divider(height: 30),
              const Text(
                '3. Scale Gesture',
                style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
              ),
              const ScaleDemo(),
              
              const Divider(height: 30),
              const Text(
                '4. Gesture Recognizer',
                style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
              ),
              const GestureRecognizerDemo(),
            ],
          ),
        ),
      ),
    );
  }
}